#ifdef TARG_SW5
cc = sw5cc.new -host -g -O0
cc_slave = sw5cc -slave -g -O0
#endif

SCHEDULER_INSTALL_PATH=${DAG_HOME}/dag_task_scheduler


CFLAGS = -I${SCHEDULER_INSTALL_PATH}/include -L${SCHEDULER_INSTALL_PATH}/lib -L./

LIBFLAGS = -ldag_task_scheduler -lstdc++ -lm -lswlu

swlu_symtable.txt: nested
	readelf -s $< > $@
    
nested: nested.o nested_master.o
	$(cc) -hybrid $(CFLAGS) -o $@ $^ $(LIBFLAGS)
	
nested.o: nested.c
	$(cc_slave) $(CFLAGS) -c $< $(LIBFLAGS)
	#$(cc) $(CFLAGS) -c $< $(LIBFLAGS)

nested_master.o: nested_master.c
	$(cc) $(CFLAGS) -c $< $(LIBFLAGS)



clean:
	@-rm -f *.o nested
